<template>
  <div :class="classes">
    <div :class="{red: show,green: greenshow}">
      成长教育

    </div>
    
    <button @click="show = !show">红色</button>
    <button @click="greenshow = !greenshow">绿色</button>
    
  </div>
</template>

<script>
export default {
  data() {
    return {
      show: false,
      greenshow: false,
      classes:['box','a','b','c']
    }
  }
}
</script>

<style>
.red{
  color:red
}
.green{
  color: green;
}
</style>